<template>
  <a @click="loading" class="loadingMore">{{ typeName[type] }}</a>
</template>

<script>
  export default {
    name: 'loadmore',
    data () {
      return {
        typeName: ['加载更多', '加载全部', '加载中']
      }
    },
    // 声明props[返回URL, 跳转URL, 标题, 有导航内容]
    props: ['fn', 'type'],
    mounted (){

    },
    methods: {
      loading: function () {
        this.$store.dispatch('getComm', {
          url: '/apis2/app/index.do',
          ok: this.fn,
          fail: 'setEmpty',
          that: this
        })
      }
    }

  }
</script>
